# s = "Hello Hogwarts!"
# for i in s:
#     print(i)  # 遍历字符串
#
# t = (1,2,3,4)
# for i in t:
#     print(i)  # 遍历元组
from random import randint

# l_1= ["get", "post", "put", "delete", "patch", "header", "options"]
# for r in l_1:
#     print(f"请求方式为 {r.upper()}")

# Methods = {
#                     "get": "用于获取服务器上的资源，通过在URL中传递参数来发送请求。",
#                     "post": "用于向服务器提交数据，一般用于创建新的资源或进行修改操作。",
#                     "put": "用于更新服务器上的资源，一般用于修改已存在的资源的全部内容。",
#                     "delete": "用于删除服务器上的资源。"
#                 }
# for m in Methods:
#     print(m)  # 默认keys
# for t in Methods.values():
#     print(t)
# for y in Methods.items():
#     print(y)

# 自动生成整数序列
# print(list(range(10)))
# print(list(range(0, 10, 2)))
# print(list(range(10, 1, -3)))

# 计算 1~10 的整数和
# result = 0
# for i in range(1, 11):
#     result += i
# print(result)

# 生成随机数

print(randint(1,3))

# user_num = int(input("请输入一个1-6之间的数字："))
# auto_num = randint(1, 6)
# if user_num > auto_num:
#     print("玩家赢")
# elif user_num < auto_num:
#     print("机器赢")
# else:
#     print("平局")

#
# data = [
#      [1,2,3,4,5,6,7,8,9],
#      ["A","B","C","D","E"],
#      ["Hello","World","Python","Hogwarts"]
#  ]
# for i in data:
#     for j in i:
#         print(j)

# data = []
# while True:
#     d = input("请输入数据：")
#     if d == "bye":
#         break
#     data.append(d)
#     print(data)

# for i in data:
#     for j in i:
#         print(j)
#         if j == "C":
#             break

# for i in range(10):
#     print("*" * 10)
#     print("i=",i)
#     if i % 3 != 0:
#         print("i*10= ", i*10)





